package com.visionblue.business.ship.page.orders

import com.visionblue.business.ship.base.BaseRepository
import com.visionblue.business.ship.model.Results
import com.visionblue.business.ship.model.bean.response.*
import com.visionblue.business.ship.model.repository.RemoteRepository
import retrofit2.http.GET
import retrofit2.http.Path

/**
 * @author: xlh
 * @date: 2021-03-29 10:33 AM
 * @desc:
 */
class OrderRepository : BaseRepository() {

    /**
     * 获取接收联单列表
     */
    suspend fun getOrdersReceiveList(page: Int): Results<ListBean<OrdersReceiveInfo>> {
        return safeApiCall(call = { RemoteRepository.getOrdersReceive(page,10) })
    }

    /**
     * 获取申报单列表
     */
    suspend fun getOrdersApplyList(page: Int): Results<ListBean<OrdersApplyInfo>> {
        return safeApiCall(call = { RemoteRepository.getOrdersApply(page,10) })
    }

    /**
     *  申报单详情页
     */
    suspend fun getApplyInfoDetail(id: String): Results<OrderApplyDetailsInfo> {
        return safeApiCall(call = { RemoteRepository.getApplyInfoDetail(id) })
    }

}